home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / menuts / c_menu.arj / 6-2MENU.TXT next >
Text File  |  1994-01-27  |  21KB  |  519 lines

  1.  
  2.                     DOS 6.2 CONFIG.SYS Menu's for Dummies
  3.  
  4.     or How to make multiple configurations run on your computer.
  5.  
  6.     Several people on CompuServe Tandy and IBM forums have asked how to
  7.  utilize the DOS 6.2 menu commands in the CONFIG.SYS and AUTOEXEC.BAT
  8.  files to create multiple configuration selections for the computer.
  9.  
  10.     Since MicroSoft in their push to conserve paper <G> put most of the
  11. information how to do this in the Help command 'On-Line', and not in the
  12. 'hard-copy' manual, it's hard to create your new CONFIG.SYS and AUTO-
  13. EXEC.BAT files and access the 'Help' at the same time.
  14.  
  15.     Of course, you can PRINT out the various help files that refer to the
  16. various menu commands, but an example in front of you, is worth more than
  17. the hassle of going between the manual, DOS Help command and re-entering
  18. your ASCII text editor, to create a working file.
  19.  
  20. I.  Definitions of CONFIG.SYS command items for multiple configurations:
  21.     (All taken straight form DOS 6.2 HELP text file.)
  22.  
  23.  
  24.     DOS 6.2's 'HELP' note <Multi-Config Commands> states:
  25.  
  26.      "A single CONFIG.SYS file can define several different system con-
  27. figurations. To define multiple configurations, you use the following
  28. special CONFIG.SYS commands: "
  29.  
  30. <Menucolor>
  31. <Menudefault>
  32. <Menuitem>
  33.  
  34.   NOTE: the additional commands <Include> and <Submenu> are not included
  35.   in this 'BASIC' example.
  36.  
  37.     Definitions:
  38.  
  39.     A. [menu]: header block tells the booting system that multiple
  40.               configurations are included in the CONFIG.SYS file. This is
  41.               always the first item at the start of the CONFIG.SYS file.
  42.  
  43.     B. Menucolor: is a command to create color information for the menu screen.
  44.  
  45.         syntax
  46.  
  47.         menucolor=x[,y]
  48.  
  49.         where x= color of text. Valid values from 0 to 15
  50.  
  51.         where y= Optional color of background. Valid values from 0 to 15.
  52.                  If not included default color is black background
  53.  
  54.         color values:
  55.  
  56.         0 Black    5 Magenta        10 Bright green    15 Bright white
  57.         1 Blue     6 Brown          11 Bright cyan
  58.         2 Green    7 White          12 Bright red
  59.         3 Cyan     8 Gray           13 Bright magenta
  60.         4 Red      9 Bright Blue    14 Yellow
  61.  
  62.         NOTE: according to DOS 6.2 values from 8 to 15 on some systems
  63.         will cause the screen to blink. Always test before making a final
  64.         color statement.
  65.  
  66.         example: menucolor=15,1 (Bright white text on Blue background)
  67.  
  68.     C. Menudefault: is a command that specifies to the system the default
  69.                    configuration that the computer uses if no selection is
  70.                    made during startup after a specified time. This command
  71.                    can only be used within the menu block of the CONFIG.SYS
  72.                    file. If it is not included the default is set to
  73.                    menu-item 1.
  74.  
  75.         syntax
  76.  
  77.         menudefault=blockname[,timeout]
  78.  
  79.         blockname is the name of the default selection to be run.
  80.  
  81.         [,timeout] is the optional amount of time the system counts down
  82.         from waiting for a key selection. If the timeout is reached
  83.         without a valid key selection the default selection is
  84.         automatically selected. Valid values are from 0 to 90 seconds
  85.  
  86.         example: menudefault=Home, 15 (Home menuitem is selected after
  87.                  15 seconds countdown delay.)
  88.  
  89.     D. Menuitem: defines an item in the startup menu. It is used only
  90.                 within the menu block of the CONFIG.SYS file. Maximum
  91.                 number of Menuitems is 9. Each Menuitem is a choice that
  92.                 appears on screen when the system boots up. Each is the
  93.                 EXACT title of a choice block that follows the menu block
  94.  
  95.         syntax
  96.  
  97.         menuitem=blockname[,menu_text]
  98.  
  99.         blockname is the EXACT title of the associated configuration
  100.         block. The configuration block must be defined elsewhere in the
  101.         CONFIG.SYS file. If it is selected from the menu, MS-DOS carries
  102.         out the commands in the block as well as any commands listed in
  103.         the CONFIG.SYS file before the [menu] block and and commands
  104.         contained in the [common] header block.  NOTE: if MS-DOS cannot
  105.         find a block with the specified (EXACT) name the name will not
  106.         appear on the startup menu. Maximum length of the block name is
  107.         70 characters. Excluded characters are (/), (\), (,), (;), (=)
  108.         and ([,]).
  109.  
  110.         ,menu_text specifies the EXACT text MS-DOS will display for this
  111.         menu item. If not specified MS-DOS will display the menu block
  112.         name as the menu item. Maximum of 70 characters with all
  113.         printable characters available.
  114.  
  115.         example: menuitem=Home, Home Ram Drive C: External Drive D:
  116.                  (defines the Home menu block and what is displayed on
  117.                  the configuration menu screen for this block.
  118.  
  119. II. Procedure for creating CONFIG.SYS Menu file:
  120.  
  121.     A. Define what configurations you require for your computer.
  122.        Examples are:
  123.  
  124.        1. Different users, Single option:
  125.  
  126.              Do different users of the computer require different
  127.           configurations? ie: Does Joe require networking and Jane
  128.           doesn't. Does Jane need only to start Windows, Does Jack only
  129.           require a statistical program to run. Each of these decisions
  130.           can create a menuitem option for the menu.
  131.  
  132.        2. Different options, Single user:
  133.  
  134.              Do you require the computer to start different programs or
  135.           does the requirements for various programs require diferent
  136.           resources (Memory, Drivers, etc) ie:
  137.  
  138.              Portables connected at home to devices or equipment you
  139.           don't take on the road.
  140.  
  141.              A Database program that requires different devices that your
  142.           word processor program doesn't need.
  143.  
  144.              That BIG game you play requires more memory than your normal
  145.           configuration has available.
  146.  
  147.              Again, each of these choices creates a menuitem option.
  148.  
  149.        3. Different users, Multiple options:
  150.  
  151.              Do your different users require different options at
  152.           different times? Although I didn't have this problem you can
  153.           either create menuitems with different titles for the same
  154.           user. ie: Jane-WP, Jane-DB, Joe-1, Joe-2, for example, or use
  155.           the Submenu command for nested configurations within a
  156.           menuitem. I haven't touched on this command because, I haven't
  157.           used it. Other 'experts' can probably provide the expertise to
  158.           use this command.
  159.  
  160.     B.  Determine the resources required for each menuitem.
  161.  
  162.              On a separate piece of paper for each menu choice, determine
  163.           what resources and CONFIG.SYS file commands are needed for each
  164.           choice you require.
  165.              After you are satisfied that the required items are listed,
  166.           place the choices next to each other and compare the items to
  167.           find common items that the entire menu can use. Any Common items
  168.           can be placed in to a menuitem labeled Common and deleted from the
  169.           other menuitem blocks.
  170.             Also decide the title of the menu choice that you want to appear
  171.           on the Menu screen, It should be descriptive enough so you can
  172.           quickly decide which configuration you want to run.
  173.  
  174.     C. Test your configuration blocks.
  175.  
  176.             Once you decide what each configuration should contain, make
  177.           sure that each will operate by making temporary CONFIG.SYS and
  178.           AUTOEXEC.BAT files to test each choice. This should insure that
  179.           they operate without problem, before you combine them in large
  180.           files that can be hard to 'Debug'.
  181.  
  182.           NOTE: Don't do this to your CONFIG.SYS and AUTOEXEC.BAT files
  183.           that run you computer now, either save you present files so you
  184.           can go back to your current configuration, or create a 'Boot
  185.           diskette' with all the required resoures and use it to 'cut and
  186.           paste' until you are satisfied. Once you have created your final
  187.           CONFIG.SYS and AUTOEXEC.BAT files then you can copy them to your
  188.           normal boot harddrive or diskette.
  189.  
  190.           HINT: Since it's easy to 'loose' root files when making changes
  191.           to your CONFIG.SYS and AUTOEXEC.BAT files, the safest thing that
  192.           I've found to prevent this is to create a "Backup" directory
  193.           with copies of the curent CONFIG.SYS and AUTOEXEC.BAT files
  194.           placed in it, along with any other files that you want to
  195.           protect. (COMMAND.COM, Batch files, etc.)
  196.  
  197.     D.  Asssembling CONFIG.SYS
  198.  
  199.             Everything checks out?  Now comes the 'hard' part putting the
  200.           files together so that they work. Place your configuration
  201.           blocks in the order you want them to appear on the menu screen
  202.           and then start your ASCII word processor or DOS's edit program.
  203.  
  204.           (Look at figs 1.1 and 1.2 for my examples)
  205.  
  206.            Lines 1 thru 9: define the menu screen
  207.  
  208.            line 1: menu block header
  209.  
  210.            line 2 thru 7: define the menu choices and what is printed on
  211.                         screen. NOTE: The bock item name must be the exact
  212.                         spelling of the menu block you want to run.
  213.  
  214.            line 8: menucolor tells the system what colors to use on the
  215.                            screen.
  216.  
  217.            line 9: menudefault what menu choice to use if I don't select a
  218.                              choice within 30 seconds.
  219.  
  220.            Lines 10, 15, 22,28,33,38: separates the configuration blocks
  221.                                      from each other.
  222.  
  223.            Lines 11,16,23,29,34,39: Are the configuration block headers.
  224.                                   Their spelling must agree with the
  225.                                   choices in the menu header block
  226.                                   above.
  227.  
  228.            Lines 11 thru 14: Common configuration block. What common
  229.                            resources are common to all possible choices
  230.                            for systems configurations.
  231.  
  232.            Lines 16 thru 21: Sample config block. What I want the Normal
  233.                            configuration to use. Note: the LASTDRIVE=K
  234.                            command is because I use the SUBST command
  235.                            to identify certain directories as virtual
  236.                            drives in this configuration.
  237.  
  238.              Happy with your CONFIG.SYS file? OK, save it and then verify
  239.           it's ok by testing on your 'scratch diskette', then when you're
  240.           finally satisfied  save it, and go on to the AUTOEXEC.BAT file.
  241.  
  242.  
  243. III. Autoexec.Bat file creation
  244.  
  245.             Now the system will boot up to a selected configuration.
  246.          However, you may want to have a certain program start once a
  247.          configuration is set. You must write your AUTOEXEC.BAT file to
  248.          select the proper commands to run the progam based upon what
  249.          configuration you selected. Fortunately, the batch command
  250.          GOTO allows this to be done easily. Using the new environment
  251.          variable %config%, the AUTOEXEC.BAT looks into the operating
  252.          configuration and then selects the correct commands to run.
  253.  
  254.      A. Procedure for creating AUTOEX.BAT file.
  255.  
  256.         1. Decide options you want.
  257.  
  258.              Again, look at what commands you need to run, once each of
  259.            the configurations created in the CONFIG.SYS file is selected.
  260.  
  261.              a. Commands common to all choices.
  262.                 (run these before your menu choices)
  263.  
  264.              b. Windows start up
  265.  
  266.              c. Game choice
  267.  
  268.              d. Comms program (Any Telecommunications software program)
  269.                 (CompuServe, TE Works, for example)
  270.  
  271.              e. Files copied to Ram Drive
  272.                 (Some users place frequently used programs on a Ram
  273.                 Drive to speed up access time.)
  274.  
  275.              f. Commands needed (set prompt for example)
  276.                 (Set Environment commands are the most obvious)
  277.  
  278.          Each of the above optional choices creates a block in the AUTO-
  279.          EXEC.BAT file that must agree in syntax to the environment variable
  280.          %menuitem% created in the CONFIG.SYS choice selection.
  281.  
  282.         2. Create menu items on paper.
  283.  
  284.            This sets the sequence you want followed in each choice.
  285.            NOTE: The title of the choice 'MUST' match the title of the
  286.            configuration block in the CONFIG.SYS file that it is used
  287.            with. (see example)
  288.              When you copy them to your AUTOEXEC.BAT file, each section
  289.            must be separated from the others by a blank line.
  290.  
  291.         3. Test you selections.
  292.  
  293.            Using the same process you used to test your configuration
  294.            blocks in the CONFIG.SYS file, test the blocks to insure
  295.            they operate correctly before assembling the final AUTO-
  296.            EXEC.BAT file.
  297.  
  298.         4. Assemble your AUTOEXEC.BAT file
  299.  
  300.              Once you have verified the blocks work and have placed them
  301.            in the order you want. Use your ASCII word processor or DOS's
  302.            EDIT to create your AUTOEXEC.BAT file.  Remember:
  303.  
  304.              a. That the line "goto %config%" must be included before the
  305.              start of the menu choices so the batch file will look into
  306.              the environment to see which choice to select.
  307.  
  308.              b. Each title must agree with a configuration block title
  309.              ie:  :Normal, :Home, :Game, :Comms for example.
  310.              Otherwise it will not run.
  311.  
  312.              c. Each choice must be separated by a blank line and must
  313.              include the command "goto end" as the last line of each
  314.              section. This allows the batch file to automatically end
  315.              once all the commands are run by the selected menuitem.
  316.  
  317.              d. The last line in the AUTOEXEC.BAT file must be ":End",
  318.              or the batch file will not stop automatically.
  319.  
  320.  Included examples:
  321.  
  322.         Fig 1.1 and 1.2 are CONFIG.SYS and AUTOEXEC.BAT files for a TANDY
  323.     1400 dual 3 1/2" floppy drive laptop, with an external 5 1/4" floppy
  324.     drive.
  325.  
  326.        Since my Tandy does not allow the CompuServe pgms and an external
  327.     drive to co-exist due to memory limitations and the fact that the ex-
  328.     ternal floppy is not present when traveling, or when running certain
  329.     games, I developed the configurations shown to select the configuration
  330.     I need at different times.
  331.  
  332.        Hey, it's an old computer, it works and is paid for, what more do
  333.     you want? The basic information will work even on a Pentium class
  334.     multi $ special, as long as you have DOS 6.2 loaded.
  335.  
  336.      The only commands that were touched on are the menu items for the
  337.    CONFIG.SYS file, and certain commands required in the AUTOEXEC.BAT file,
  338.    you should be familiar with all other commands by now.
  339.  
  340.      For clarity each line of the CONFIG.SYS and AUTOEXEC.BAT is numbered
  341.   and these numbers should be not be used in actual files. Notes about each
  342.   line are separated by "+ +" and should not be included in your files.
  343.  
  344.  1. Menu choices made:
  345.  
  346.    A. On all selections common items required:
  347.  
  348.       load SETVERS, MOUSE and ANSI drivers
  349.  
  350.  
  351.   B. Home configuration items:
  352.  
  353.       Ram Drive C:
  354.       load various DOS files into Ram Drive root directory and certain batch
  355.       and small .EXE and .COM files into a subdirectory on the ram drive
  356.  
  357.       external Drive D:
  358.       defines the external disk drive as drive D: the configuration
  359.       block will load the device driver and identify the drive as the D:
  360.       drive
  361.  
  362.  
  363.    C. GAME1 configuration:
  364.  
  365.       no ram drive
  366.       make external floppy drive C:
  367.  
  368.  
  369.    D. GAME2 configuration:
  370.  
  371.       no ram drive
  372.       no external floppy drive
  373.  
  374.  
  375.    E. COMMS configuration:
  376.  
  377.       no ram drive
  378.       no external floppy drive
  379.       maximum memory to run large pgme files such as CompuServe
  380.       NOTE: This is a slightly different configuration than GAME2.
  381.  
  382.    F. Road configuration:
  383.  
  384.       ram drive as C: drive
  385.       load various DOS files into Ram Drive root directory and certain batch
  386.       and small .EXE and .COM files into a subdirectory on the ram drive
  387.  
  388.  
  389. Fig 1.1 CONFIG.SYS
  390. ------------------------------------------------------------------
  391.  
  392. 1.  [menu]          +tells systems configuration is menu format+
  393. 2.  menuitem=Common +menu selection title and title on screen+
  394. 3.  menuitem=Normal, Ram Drive=C, B/P Drive=D Home    +menu selection+
  395. 4.  menuitem=Game1,  No Ram Drive, B/P Drive=C Home   +menu selection+
  396. 5.  menuitem=Game2,  No Ram Drive, No B/P Drive Home/Road +menu selection+
  397. 6.  menuitem=Comms,  Compuserve No B/P drive, No Ram Home/Road +menu selection+
  398. 7.  menuitem=Road1,  Ram Drive=C, No B/P drive Road +menu selection+
  399. 8.  menucolor=15,1   +sets color of menu: white text on blue background+
  400. 9.  menudefault=Normal, 30 +tells system default selection and time delay+
  401. 10.                  +blank line separator+
  402. 11. [Common]     +menu selection title+ +title must be same as title above+
  403. 12. device=A:\DOS\Setver.exe
  404. 13. device=A:\DOS\Mouse.sys
  405. 14. device=A:\DOS\ansi.sys
  406. 15.
  407. 16. [Normal]         +menu selection title+
  408. 17. device=A:\DOS\Ramdrive.sys 128
  409. 18. device=A:\DOS\Backpack.sys
  410. 19. files=40
  411. 20. buffers=20
  412. 21. lastdrive=k
  413. 22.
  414. 23. [Game1]          +menu selection title+
  415. 24. device=A:\DOS\Backpack.sys
  416. 25. files=20
  417. 26. buffers=10
  418. 27. lastdrive=c
  419. 28.
  420. 29. [Game2]          +menu selection title+
  421. 30. files=20
  422. 31. buffers=10
  423. 32. lastdrive=c
  424. 33.
  425. 34. [Comms]          +menu selection title+
  426. 35. files=40
  427. 36. buffers=20
  428. 37. lastdrive=c
  429. 38.
  430. 39. [Road1]          +menu selection title+
  431. 40. device=A:\DOS\Ramdrive.sys 128
  432. 41. files=20
  433. 42. buffers=10
  434. 43. lastdrive=c
  435.  
  436. ------------------------------------------------------------------
  437.  
  438. Fig 1.2 AUTOEXEC.BAT file:
  439.  
  440. Note: the various commands such as SECRET.COM are peculiar to my
  441. files and should not be used if you decide to copy this example.
  442. If you leave them in the batch file you'll get ERROR messages such
  443. as: "File not found", "File not copied" or other such ERROR messages
  444. if you run the AUTOEXEC.BAT file as written below.
  445. -----------------------------------------------------------------
  446.  
  447. 1.  @a:\bin\secret.com       + runs pgme without showing title on screen+
  448. 2.  cls
  449. 3.  pause
  450. 4.  @type a:\backup\gund.txt  +types text on screen without title+
  451. 5.  pause
  452. 6.  cls
  453. 7.  prompt=$P$G
  454. 8.  goto %config% +tells system to select setion with the same name as+
  455.                   +the selected item in the CONFIG.SYS file+
  456. 9.                + blank separator line+
  457. 10. :Normal       +Normal config selection autoexec commands+
  458. 11. cd a:\backup
  459. 12. @autox       +batch command to load files to Ram drive C:+
  460. 13. cd\
  461. 14. c:
  462. 15. goto end      +tells system to skip rest of choices ang end program+
  463. 16.
  464. 17. :Game1        +Game1 config selection autoexec commands+
  465. 18. goto end
  466. 19.
  467. 20. :Game2        +Game2 config selection autoexec commands+
  468. 21. goto end
  469. 22.
  470. 23. :Comms        +Comms config selection autoexec commands+
  471. 24. prompt=COMMS$P$G  +reminds that the Comms config is selected+
  472. 25. goto end
  473. 26.
  474. 27. :Road1       +Road config selection autoexec commands+
  475. 28. cd a:\backup
  476. 29. @autox
  477. 30. cd\
  478. 31. c:
  479. 32. goto end
  480. 33.
  481. 34. :end        +batch file end command+
  482.  
  483. -----------------------------------------------------------------
  484.  
  485. NOTE: To those who would like to use multiple configurations, and
  486. haven't upgraded to MS-DOS 6.x, You can operate by creating several
  487. difffernt CONFIG.SYS and AUTOEXEC.BAT files with different titles and
  488. creating a batch file to copy a selected configuration to the CONFIG.SYS
  489. and AUTOEXEC.BAT files that will operate the next time you reboot.
  490.  
  491. For example using the choices above:
  492.  
  493.  Normal: Ramdrive & External drive=     CON1.txt & Auto1.txt
  494.  Games1: External drive=                CON2.txt & Auto2.txt
  495.  Comms:  No Ram Drive, External Drive=  CON3.txt & Auto3.txt
  496.  
  497.  Your menu choices are:
  498.  
  499.  1. Normal
  500.  2. Games1
  501.  3. Comms
  502.  
  503.  The choices as selected will copy:
  504.  
  505.  1: CON1.txt to CONFIG.SYS, Auto1.txt  to AUTOEXEC.BAT
  506.  2: CON2.txt to CONFIG.SYS, Auto2.txt  to AUTOEXEC.BAT
  507.  3: CON3.txt to CONFIG.SYS, Auto3.txt  to AUTOEXEC.BAT
  508.  
  509.  When you 'reboot' the computer starts in the configuration you
  510.  selected.
  511.  
  512. -------------------------------------------------------------------------------
  513.  
  514. Comments: Any comments, flak, or suggested improvements to this help
  515. text can be sent to me, I may or may not answer them personally, but
  516. will consider them for inclusion in later versions of this file.
  517.  
  518. Richad H Brown
  519.